import { http } from "../utils/http"

// 添加收获地址
export const postMemberAddressAPI = (data) => {
  return http({
    url: '/member/address',
    method: 'post',
    data
  })
}
// 获取地址列表
export const getMemberAddressAPI = () => {
  return http({
    url: '/member/address',
    method: 'get'
  })
}
// 获取地址列表
export const getMemberAddressByIdAPI = (id) => {
  return http({
    url: '/member/address/' + id,
    method: 'get'
  })
}
// 修改收获地址
export const putMemberAddressAPI = (id, data) => {
  return http({
    url: '/member/address/' + id,
    method: 'put',
    data
  })
}
// 删除地址
export const deleteMemberAddressAPI = (id) => {
  return http({
    url: '/member/address/' + id,
    method: 'delete',
  })
}